<?php
include_once 'User.php';
include_once 'Logger.php';


test();

function test() {
	try {
		//First try getting our user numero uno
		$user = new User(1);

		//Then, let's try to get the exception
		$user2 = new User('not numeric');
	} catch( Exception $e ) {
		echo "Donkey Kong has caught an exception: {$e->getMessage()}";
		echo "<br \>";
		echo "Donkey Kong has caught an exception: {$e->getCode()}";
		Logger::newMessage($e);

		// get the trace of the exception
		echo '<pre>';
		echo $e->getTraceAsString();
		echo '</pre>';
	}
}

function notHandledExcp() {
	$user = new User(1);
	$user = new User("no numeric");
}




?>